﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:UniPie"
             x:Class="UniPie.PieMenu" 
             mc:Ignorable="d"
             d:DesignHeight="320" d:DesignWidth="320" MinWidth="320" MinHeight="320" MaxWidth="320" MaxHeight="320" Name="PieMenuControl" xmlns:my="clr-namespace:ValueConverters" IsEnabledChanged="HandleIsEnabledChanged">
    <UserControl.Resources>
        <my:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter1" />
    </UserControl.Resources>
    <Grid ScrollViewer.VerticalScrollBarVisibility="Disabled" Name="PieContainer" x:FieldModifier="public">
    	<VisualStateManager.VisualStateGroups>
    		<VisualStateGroup x:Name="VisualStateGroup">
    			<VisualState x:Name="Default"/>
    			<VisualState x:Name="Disabled">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PieContainer">
    						<EasingDoubleKeyFrame KeyTime="0" Value="0.245"/>
    					</DoubleAnimationUsingKeyFrames>
    				</Storyboard>
    			</VisualState>
    		</VisualStateGroup>
    	</VisualStateManager.VisualStateGroups>
		<Grid.Effect>
			<DropShadowEffect ShadowDepth="0" BlurRadius="8"/>
		</Grid.Effect>
        <local:PieSlice Height="72" HorizontalAlignment="Left" x:Name="Slice0" VerticalAlignment="Top" Width="40.001" Margin="140.012,143.006,0,0" PropertyChanged="HandleSlicePropertyChanged" Visibility="{Binding ElementName=PieMenuControl, Path=PreviewMode, Converter={StaticResource BooleanToVisibilityConverter1}, ConverterParameter=Reversed}" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[0]}"/>
        <local:PieSlice Height="71" HorizontalAlignment="Left" x:Name="Slice1" VerticalAlignment="Top" Width="114" d:LayoutOverrides="VerticalAlignment" Margin="103.01,9.972,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Outer8" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[1]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}" />
        <local:PieSlice Height="71" HorizontalAlignment="Left" x:Name="Slice2" VerticalAlignment="Top" Width="114" Margin="103.01,9.972,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Outer8" d:LayoutOverrides="VerticalAlignment" RenderTransformOrigin="0.5,2.084" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[2]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="45"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="71" HorizontalAlignment="Left" x:Name="Slice3" VerticalAlignment="Top" Width="114" Margin="103.01,9.972,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Outer8" RenderTransformOrigin="0.5,2.084" d:LayoutOverrides="VerticalAlignment" TextPlacementRadial="True" TextFlipped="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[3]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="90"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="71" HorizontalAlignment="Left" x:Name="Slice4" VerticalAlignment="Top" Width="114" Margin="103.01,9.972,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Outer8" RenderTransformOrigin="0.5,2.084" d:LayoutOverrides="VerticalAlignment" TextFlipped="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[4]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="135"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="71" HorizontalAlignment="Left" x:Name="Slice5" VerticalAlignment="Top" Width="114" Margin="103.01,9.972,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Outer8" RenderTransformOrigin="0.5,2.084" d:LayoutOverrides="VerticalAlignment" TextFlipped="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[5]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="180"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="71" HorizontalAlignment="Left" x:Name="Slice6" VerticalAlignment="Top" Width="114" Margin="103.01,9.972,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Outer8" RenderTransformOrigin="0.5,2.084" d:LayoutOverrides="VerticalAlignment" TextFlipped="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[6]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="-135"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="71" HorizontalAlignment="Left" x:Name="Slice7" VerticalAlignment="Top" Width="114" Margin="103.01,9.972,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Outer8" RenderTransformOrigin="0.5,2.084" d:LayoutOverrides="VerticalAlignment" TextPlacementRadial="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[7]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="-90"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="71" HorizontalAlignment="Left" x:Name="Slice8" VerticalAlignment="Top" Width="114" Margin="103.01,9.972,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Outer8" RenderTransformOrigin="0.5,2.084" d:LayoutOverrides="VerticalAlignment" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[8]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="-45"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="71.999" HorizontalAlignment="Left" x:Name="Slice9" VerticalAlignment="Top" Width="114" Margin="126.007,76.365,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Inner8" d:LayoutOverrides="VerticalAlignment" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[9]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}"/>
        <local:PieSlice Height="72" HorizontalAlignment="Left" x:Name="Slice10" VerticalAlignment="Top" Width="68" Margin="126.007,76.365,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Inner8" d:LayoutOverrides="VerticalAlignment" RenderTransformOrigin="0.5,1.162" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[10]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="45"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="72" HorizontalAlignment="Left" x:Name="Slice11" VerticalAlignment="Top" Width="68" Margin="126.007,76.365,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Inner8" RenderTransformOrigin="0.5,1.162" d:LayoutOverrides="VerticalAlignment" TextPlacementRadial="True" TextFlipped="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[11]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="90"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="72" HorizontalAlignment="Left" x:Name="Slice12" VerticalAlignment="Top" Width="68" Margin="126.007,76.365,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Inner8" RenderTransformOrigin="0.5,1.162" d:LayoutOverrides="VerticalAlignment" TextFlipped="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[12]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="135"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="72" HorizontalAlignment="Left" x:Name="Slice13" VerticalAlignment="Top" Width="68" Margin="126.007,76.365,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Inner8" RenderTransformOrigin="0.5,1.162" d:LayoutOverrides="VerticalAlignment" TextFlipped="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[13]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="180"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="72" HorizontalAlignment="Left" x:Name="Slice14" VerticalAlignment="Top" Width="68" Margin="126.007,76.365,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Inner8" RenderTransformOrigin="0.5,1.162" d:LayoutOverrides="VerticalAlignment" TextFlipped="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[14]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="-135"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="72" HorizontalAlignment="Left" x:Name="Slice15" VerticalAlignment="Top" Width="68" Margin="126.007,76.365,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Inner8" RenderTransformOrigin="0.5,1.162" d:LayoutOverrides="VerticalAlignment" TextPlacementRadial="True" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[15]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="-90"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
        <local:PieSlice Height="72" HorizontalAlignment="Left" x:Name="Slice16" VerticalAlignment="Top" Width="68" Margin="126.007,76.365,0,0" PropertyChanged="HandleSlicePropertyChanged" Shape="Inner8" RenderTransformOrigin="0.5,1.162" d:LayoutOverrides="VerticalAlignment" Definition="{Binding ElementName=PieMenuControl, Path=SliceDefinitions[16]}" PreviewMode="{Binding ElementName=PieMenuControl, Path=PreviewMode}">
        	<local:PieSlice.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="-45"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</local:PieSlice.RenderTransform>
        </local:PieSlice>
		<Path x:Name="ellipse" Data="M319.5,160 C319.5,248.08942 248.08942,319.5 160,319.5 C71.910582,319.5 0.5,248.08942 0.5,160 C0.5,71.910582 71.910582,0.5 160,0.5 C248.08942,0.5 319.5,71.910582 319.5,160 z" Fill="#00FF0000" Stretch="Fill" Stroke="Red" Margin="48" IsHitTestVisible="False" Visibility="Hidden">
			<Path.LayoutTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform Angle="-90"/>
					<TranslateTransform/>
				</TransformGroup>
			</Path.LayoutTransform>
		</Path>
    </Grid>
</UserControl>
